{layout name="layout" /}
<!-- Main content -->
<div class="box box-default">
    <div class="box-header with-border">
        {if condition="isset($title)"}
        <h3 class="box-title">{$title}</h3>
        {else /}
        {if condition="$posts_data_id > 0"}
        <h3 class="box-title">修改{$posts['post_title']}数据</h3>
        {else /}
        <h3 class="box-title">添加{$posts['post_title']}数据</h3>
        {/if}
        {/if}
    </div>
    <div class="row">
        <div class="col-xs-12">
            <form class="form-horizontal ingeAjax" method="post" action="{if condition="$posts_data_id > 0"}{:url('/home/posts/add_edit',['pid'=>$post_id,'pdid'=>$posts_data_id])}{else /}{:url('/home/posts/add_edit',['pid'=>$post_id])}{/if}">
                <div class="space-2"></div>
                {$form}
                <div class="form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-primary" type="submit">
                            <i class="fa fa-check bigger-110"></i> 保存
                        </button> &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset" onclick="history.go(-1);">
                            <i class="fa fa-undo bigger-110"></i> 返回
                        </button>&nbsp; &nbsp; &nbsp;
                        {if condition="isset($data.mb_id)"}
                        
                        {else /}
                        <button class="btn" type="reset">
                            <i class="fa fa-undo bigger-110"></i> 重置
                        </button>
                        {/if}
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- /.row -->
    </section>
    {include file="public/base" /} {include file="public/edit" /} {$script} {include file="public/footer" /}
    </body>
    </html>
